#include <immintrin.h>
#include <stdio.h>
#include <unistd.h>

static void sub()
{
	volatile __m256 v;
	register __m256 v0 asm("ymm0");
	register __m256 v1 asm("ymm1");
	unsigned long long a, b;
	a = _rdtsc();
	for (int i = 4096; i; --i)
		v = _mm256_add_ps(v0, v1);
	_mm_mfence();
	b = _rdtsc();
	printf("%llu\n", b - a);
}

int main()
{
	sub();
	sub();
	usleep(10000);
	sub();
	sub();
	return 0;
}
